Public Class frmReportePedidoDiario

    Private Sub frmReportePedidoDiario_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        'Dim CrReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
        'CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
        'CrReport.Load(Application.StartupPath & "\CrystalReport1.rpt")

        ' Me.ReportViewer1.RefreshReport()

        lblTitulo.ForeColor = Color.White
        datFecha.ForeColor = Color.White
        lblSubtitulo.ForeColor = System.Drawing.Color.FromArgb(13, 71, 161)
        datFecha.Value = Now()

    End Sub

   
    Sub PerpararReporte()
        Dim FECHA_ACTUAL As String = datFecha.Value.ToString("MM/dd/yyyy")
        Call SetSqlCitra("UPDATE PEDIDOS SET REPORTEAR=0")
        Call SetSqlCitra("UPDATE PEDIDOS SET REPORTEAR=1 WHERE CONVERT(VARCHAR,FECHA_RECEPCION,101)='" & FECHA_ACTUAL & "'")

        Me.CrystalReportViewer1.RefreshReport()
    End Sub


    Private Sub btnRegresar_Click(sender As System.Object, e As System.EventArgs) Handles btnRegresar.Click
        DialogResult = Windows.Forms.DialogResult.OK
        Close()

    End Sub

    Private Sub btnMenu_Click(sender As System.Object, e As System.EventArgs) Handles btnMenu.Click
        PerpararReporte()

    End Sub
End Class